package generator.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * config_tag_relation
 * @TableName config_tags_relation
 */
@TableName(value ="config_tags_relation")
public class ConfigTagsRelation implements Serializable {
    /**
     * nid, 自增长标识
     */
    @TableId(type = IdType.AUTO)
    private Long nid;

    /**
     * id
     */
    private Long id;

    /**
     * tag_name
     */
    private String tagName;

    /**
     * tag_type
     */
    private String tagType;

    /**
     * data_id
     */
    private String dataId;

    /**
     * group_id
     */
    private String groupId;

    /**
     * tenant_id
     */
    private String tenantId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * nid, 自增长标识
     */
    public Long getNid() {
        return nid;
    }

    /**
     * nid, 自增长标识
     */
    public void setNid(Long nid) {
        this.nid = nid;
    }

    /**
     * id
     */
    public Long getId() {
        return id;
    }

    /**
     * id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * tag_name
     */
    public String getTagName() {
        return tagName;
    }

    /**
     * tag_name
     */
    public void setTagName(String tagName) {
        this.tagName = tagName;
    }

    /**
     * tag_type
     */
    public String getTagType() {
        return tagType;
    }

    /**
     * tag_type
     */
    public void setTagType(String tagType) {
        this.tagType = tagType;
    }

    /**
     * data_id
     */
    public String getDataId() {
        return dataId;
    }

    /**
     * data_id
     */
    public void setDataId(String dataId) {
        this.dataId = dataId;
    }

    /**
     * group_id
     */
    public String getGroupId() {
        return groupId;
    }

    /**
     * group_id
     */
    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    /**
     * tenant_id
     */
    public String getTenantId() {
        return tenantId;
    }

    /**
     * tenant_id
     */
    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ConfigTagsRelation other = (ConfigTagsRelation) that;
        return (this.getNid() == null ? other.getNid() == null : this.getNid().equals(other.getNid()))
            && (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTagName() == null ? other.getTagName() == null : this.getTagName().equals(other.getTagName()))
            && (this.getTagType() == null ? other.getTagType() == null : this.getTagType().equals(other.getTagType()))
            && (this.getDataId() == null ? other.getDataId() == null : this.getDataId().equals(other.getDataId()))
            && (this.getGroupId() == null ? other.getGroupId() == null : this.getGroupId().equals(other.getGroupId()))
            && (this.getTenantId() == null ? other.getTenantId() == null : this.getTenantId().equals(other.getTenantId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getNid() == null) ? 0 : getNid().hashCode());
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTagName() == null) ? 0 : getTagName().hashCode());
        result = prime * result + ((getTagType() == null) ? 0 : getTagType().hashCode());
        result = prime * result + ((getDataId() == null) ? 0 : getDataId().hashCode());
        result = prime * result + ((getGroupId() == null) ? 0 : getGroupId().hashCode());
        result = prime * result + ((getTenantId() == null) ? 0 : getTenantId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", nid=").append(nid);
        sb.append(", id=").append(id);
        sb.append(", tagName=").append(tagName);
        sb.append(", tagType=").append(tagType);
        sb.append(", dataId=").append(dataId);
        sb.append(", groupId=").append(groupId);
        sb.append(", tenantId=").append(tenantId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}